using System;

namespace SharpMud.Text.Formatting.BuiltIn
{
	public class ExactTextInsertion : ITextFormatEffect
	{
		private string _txt;

		#region Constructors
		private ExactTextInsertion()
		{
		}
		public ExactTextInsertion(string txt)
		{
			_txt = txt;
		}
		#endregion

		#region ITextFormatEffect Members

		public string Render(SharpMud.Net.Telnet.Session.TelnetSessionBase telnetSession)
		{
			return _txt;
		}

		#endregion

        #region Static Static Stuff
        public class LeftSquareBracket : ExactTextInsertion
        { public LeftSquareBracket() : base("[") { } }

        public class RightSquareBracket : ExactTextInsertion
        { public RightSquareBracket() : base("]") { } }

        public class LeftCurlyBrace : ExactTextInsertion
        { public LeftCurlyBrace() : base("{") { } }

        public class RightCurlyBrace : ExactTextInsertion
        { public RightCurlyBrace() : base("}") { } }

        public class SessionNewLine : ITextFormatEffect
        {
            #region ITextFormatEffect Members

            public SessionNewLine() { }

            public string Render(SharpMud.Net.Telnet.Session.TelnetSessionBase telnetSession)
            {
                return telnetSession.NewLine;
            }

            #endregion
        }

        public class SystemNewLine : ITextFormatEffect
        {
            #region ITextFormatEffect Members

            public SystemNewLine() { }

            public string Render(SharpMud.Net.Telnet.Session.TelnetSessionBase telnetSession)
            {
                return System.Environment.NewLine;
            }

            #endregion
        }
        #endregion
    }
}
